#include<vector>
#include<unordered_set>

using std::vector;
using std::unordered_set;


class Solution {
public:
    int singleNumber(vector<int>& nums) {
        int num = 0;
        for (auto n: nums) num ^= n;
        return num;
    }
};